<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path;
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>
        ${title}
    </title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="<%=basePath%>/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=basePath%>/css/font-awesome.min.css">
    <link rel="stylesheet" href="<%=basePath%>/css/ionicons.min.css">
    <link rel="stylesheet" href="<%=basePath%>/dist/css/AdminLTE.min.css">
    <link rel="stylesheet" href="<%=basePath%>/toastr/toastr.css" type="text/css"/>
    <link rel="stylesheet" href="<%=basePath%>/dist/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="<%=basePath%>/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css">
    <link rel="stylesheet" href="<%=basePath%>/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css">
    <link rel="stylesheet" href="<%=basePath%>/plugins/iCheck/all.css">
    <link rel="stylesheet" href="<%=basePath%>/pagination/style/pagination.css" media="screen">
    <link rel="stylesheet" href="<%=basePath%>/plugins/iziModal/css/iziModal.min.css">
    <link rel="stylesheet" href="<%=basePath%>/plugins/select2/select2.min.css">
    <link rel="stylesheet" href="<%=basePath%>/plugins/iCheck/all.css">
    <link rel="stylesheet" href="<%=basePath%>/plugins/loaders/loaders.css"/>
    <link rel="stylesheet" href="<%=basePath%>/plugins/flavr/animate.css"/>
    <link rel="stylesheet" href="<%=basePath%>/plugins/flavr/flavr.css"/>
    <link rel="stylesheet" href="<%=basePath%>/plugins/bootstrap-treeview/css/bootstrap-treeview.css">
    <link rel="stylesheet" href="<%=basePath%>/fileupload/fileinput.min.css" type="text/css" />
    <link rel="stylesheet" href="<%=basePath%>/fileupload/fileinput.css" media="all" type="text/css" />
    <style type="text/css">
        .part-p{
            font-size: 16px;
            padding: 10px;
            background: #eee;
        }
        .file-remove{
            position: absolute;
            top: 120px;
            right: 75px;
            font-size: 16px;
            color: #EA544A;
            cursor: pointer;
        }
    </style>
</head>
<!-- ADD THE CLASS sidedar-collapse TO HIDE THE SIDEBAR PRIOR TO LOADING THE SITE -->
    <body class="hold-transition skin-blue sidebar-mini">
    <div id="request-div" style="position: absolute;width: 100%;height: 100%;z-index: 10;display: none;">
        <img src='../images/request-sending.gif' style="position: relative;top: 50%;left: 50%;width: 70px;height: 70px">
    </div>
    <!-- Site wrapper -->
    <div class="wrapper">
        <header class="main-header">
            <!-- Logo -->
            <jsp:include page="../logo.jsp" ></jsp:include >
            <!-- Header Navbar: style can be found in header.less -->
            <nav class="navbar navbar-fixed-top">
                <!-- Sidebar toggle button-->
                <a class="sidebar-toggle" data-toggle="offcanvas" role="button" onclick="show()">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </a>
                <jsp:include page="../menuTop.jsp"></jsp:include>
            </nav>

        </header>

        <!-- =============================================== -->

        <!-- Left side column. contains the sidebar -->
        <aside class="main-sidebar">
            <jsp:include page="../menu.jsp"></jsp:include>
            <!-- /.sidebar -->
        </aside>
        <div class="content-wrapper" style="padding-top:50px;">
            <section class="content-header">
                <ol class="breadcrumb">
                    <li class="text-muted"><i class="fa fa-th"></i>&nbsp;&nbsp;服务管理
                    </li>
                    <li class="text-muted"><i class="fa fa-circle-o"></i>&nbsp;&nbsp;培训
                    </li>
                </ol>
            </section>

            <input type="hidden" value="<%=basePath%>/" id="apiUrl">
            <section class="content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="box box-info">
                            <div class="box-header with-border text-left">
    	      				<span class="pull-left">
                                 <button id="add" type="button" onclick="addTrain()" class="btn btn-info btn-sm" data-toggle="tooltip" title="新增">
                                  <i class="fa fa-plus"></i>
                                </button>
                                <button id="edit" type="button" onclick="addDaily()" class="btn btn-info btn-sm" data-toggle="tooltip" title="添加日常" >
                                  <i class="fa fa-calculator"></i>
                                </button>
                                <button id="upload" type="button" class="btn btn-info btn-sm" data-toggle="tooltip" title="上传文件" >
                                  <i class="fa fa-upload"></i>
                                </button>
                                <button id="release" type="button" class="btn btn-info btn-sm" data-toggle="tooltip" title="上传人员信息" >
                                  <i class="fa fa-paper-plane-o"></i>
                                </button>
                            </span>
                            <span class="pull-right">
                                <span>显示</span>
                                <select id="show-count" style="color: #EA544A">
                                    <option value="20">20</option>
                                    <option value="50">50</option>
                                    <option value="100">100</option>
                                    <option value="200">200</option>
                                </select>
                                <span>条，</span>
                                <span>共计</span>
                                <span id="total-count">0</span>
                                <span>条</span>
                                <button id="refresh" type="button" class="btn btn-info btn-sm" data-toggle="tooltip" title="刷新" onclick="refresh()">
                                    <i class="fa fa-refresh"></i>
                                </button>
                                <button id="search" type="button" class="btn btn-info btn-sm" data-toggle="tooltip" title="查询"  onclick="search()">
                                    <i class="fa fa-search"></i>
                                </button>
    	                  	</span>
                            </div>

                            <div class="box-body" style="margin: 5px 0px -10px 0px">
                                <!-- form start -->
                                <form id="queryForm">
                                    <div class="row">
                                        <div class="col-md-3">
                                            <div class="form-group">
                                                <input type="text" class="form-control" id="trainInfo" name="trainInfo" placeholder='培训标题'>
                                            </div>
                                        </div>
                                        <div class="col-md-3">
                                            <div class="form-group">
                                                <input type="text" class="form-control date-input" id="trainTime" name="trainTime"
                                                placeholder='培训时间'>
                                            </div>
                                        </div>
                                        <div class="col-md-3">
                                            <div class="form-group">
                                                <input type="text" class="form-control" id="trainTime" name="trainTime"
                                                placeholder='培训人'>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="box-body table-responsive no-padding">
                                <table class="table table-bordered">
                                    <thead>
                                        <tr class="info">
                                            <th class="text-center text-muted" style="width: 30px">#</th>
                                            <th class="text-center text-muted" style="width: 50px">选择</th>
                                            <th class="text-center text-muted" style="width: 50px">操作</th>
                                            <th class="text-muted">培训标题</th>
                                            <th class="text-muted">开始时间</th>
                                            <th class="text-muted">结束时间</th>
                                            <th class="text-muted">培训类型</th>
                                            <th class="text-right text-muted">培训费用（元）</th>
                                            <th class="text-right text-muted">参加人数</th>
                                            <th class="text-muted">培训人</th>
                                            <th class="text-muted">状态</th>
                                        </tr>
                                    </thead>
                                    <tfoot id="train_table">
                                        
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
        </div>

        <footer class="main-footer">
            <div class="pull-right hidden-xs">
                <b>Version</b> 1.0.0
            </div>
            <strong>Copyright &copy; 2019 <a href="http://almsaeedstudio.com">Topmed</a>.</strong> All rights reserved.
        </footer>
        <jsp:include page="../menuRight.jsp"></jsp:include>
    </div>

    <!-- 编辑培训 -->
    <div id="add-modal" style="display: none;">
        <div class="box-body">
            <form class="form-horizontal" id="addFrom">
                <div class="part-one">
                    <div class="form-group col-md-12">
                        <p class="part-p">培训信息</p>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-md-4 control-label text-muted">开始时间</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control date-input" name="trainStartDate" id="trainStartDate">
                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-md-4 control-label text-muted">结束时间</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control date-input" name="trainEndDate" id="trainEndDate">
                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-md-4 control-label text-muted">培训类型</label>
                        <div class="col-md-8">
                            <select class="form-control init-select" style="width: 100%" id="trainType" name="trainType">
                                <option value=""></option>
                                <option value="1">一对一培训</option>
                                <option value="2">开放式现场培训</option>
                                <option value="3">开放式网络培训</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-md-4 control-label text-muted">培训标题</label>
                        <div class="col-md-8">
                            <input class="form-control" id="trainTitle" name="trainTitle">
                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-md-4 control-label text-muted">培训费用</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" name="trainCost" id="trainCost">
                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-md-4 control-label text-muted">开启签到按钮</label>
                        <div class="col-md-8">
                            <select class="form-control init-select" style="width: 100%" id="openSignIn" name="openSignIn">
                                <option value="0">否</option>
                                <option value="1">是</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-md-4 control-label text-muted">培训人</label>
                        <div class="col-md-8">
                             <input type="text" class="form-control" name="trainPerson" id="trainPerson" placeholder="如有多人请用逗号隔开">
                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-md-4 control-label text-muted">培训内容</label>
                        <div class="col-md-8">
                             <input type="text" class="form-control" name="trainContent" id="trainContent">
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-md-2 control-label text-muted">培训地址</label>
                        <div class="col-md-10" style="padding-left: 10px;padding-right: 43px;">
                            <input type="text" class="form-control" name="trainAddress" id="trainAddress" placeholder="如有多个地址请用逗号隔开">
                        </div>
                    </div>
                </div>
                <div class="part-two">
                    <div class="form-group col-md-12">
                        <p class="part-p">人员信息</p>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-md-4 control-label text-muted">文件上传</label>
                        <div class="col-md-8">
                            <input type="file" name="files" class="file" id="filesperson" multiple/>
                        </div>
                    </div>
                </div>
                <div class="part-three">
                    <div class="form-group col-md-12">
                        <p class="part-p">
                            <span>文件信息</span>
                            <span class="fa fa-plus" id="fileAdd" style="cursor: pointer;color: #00c0ef;margin-left: 5px"></span>
                        </p>
                    </div>
                    <div class="col-md-12 file_count_1" style="padding: 0">
                        <div class="form-group col-md-6">
                            <label class="col-md-4 control-label text-muted">文件标题</label>
                            <div class="col-md-8">
                                <input type="text" class="form-control" name="fileTitle" id="fileTitle_1">
                            </div>
                        </div>
                        <div class="form-group col-md-6">
                            <label class="col-md-4 control-label text-muted">文件内容</label>
                            <div class="col-md-8">
                                <input type="text" class="form-control" name="fileContent" id="fileContent_1">
                            </div>
                        </div>
                        <div class="form-group col-md-6">
                            <label class="col-md-4 control-label text-muted">文件类型</label>
                            <div class="col-md-8">
                                <select class="form-control init-select" style="width: 100%" name="fileType" id="fileType_1">
                                    <option value=""></option>
                                    <option value="1">图片</option>
                                    <option value="2">pdf</option>
                                    <option value="3">excel</option>
                                    <option value="4">world</option>
                                    <option value="5">视频</option>
                                    <option value="6">超链接</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group col-md-6 show-link hide">
                            <label class="col-md-4 control-label text-muted">链接地址</label>
                            <div class="col-md-8">
                                <input type="text" class="form-control" name="fileLink" id="fileLink_1">
                            </div>
                        </div>
                        <div class="form-group col-md-6">
                            <label class="col-md-4 control-label text-muted">文件上传</label>
                            <div class="col-md-8">
                                <input type="file" name="files" class="file" id="files_1" multiple/>
                            </div>
                        </div>
                    </div>
                    <div class="new-file"></div>
                </div>
            </form>
        </div>
        <div class="box-footer">
            <span class="pull-right">
                <button data-iziModal-close class="btn btn-default" style="margin-right: 5px">取消</button>
                <button id="saveTrain" type="button" class="btn btn-info">保存</button>
            </span>
        </div>
    </div>

    <!-- 添加日常 -->
    <div id="daily-modal" style="display: none;">
        <div class="box-body">
            <form class="form-horizontal" id="addFrom">
                <div class="daily_1">
                    <div class="form-group col-md-6">
                        <label class="col-md-4 control-label text-muted">开始时间</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control date-input" name="dailyStartDate" id="dailyStartDate_1">
                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-md-4 control-label text-muted">结束时间</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control date-input" name="dailyEndDate" id="dailyEndDate_1">
                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-md-4 control-label text-muted">日常标题</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" name="dailyTitle" id="dailyTitle_1">
                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-md-4 control-label text-muted">日常内容</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" name="dailyContent" id="dailyContent_1">
                        </div>
                    </div>
                    <div class="form-group col-md-12" style="position: relative;">
                        <label class="col-md-2 control-label text-muted">备注</label>
                        <div class="col-md-10" style="padding-left: 10px;padding-right: 43px;">
                            <input type="text" class="form-control" name="dailyRemark" id="dailyRemark_1">
                        </div>
                        <span class="fa fa-plus" id="dailyAdd" style="position: absolute;cursor: pointer;top: 10px;right: 25px;color: #00C0EF"></span>
                    </div>
                </div>
                <div class="new-daily">
                </div>
            </form>
        </div>
        <div class="box-footer">
            <span class="pull-right">
                <button data-iziModal-close class="btn btn-default" style="margin-right: 5px">取消</button>
                <button id="saveDaily" type="button" class="btn btn-info">保存</button>
            </span>
        </div>
    </div>

    <div id="add-file" style="display: none;">
        <div class="row">
            <div class="col-md-12">
                <div class="box-body">
                    <form class="form-horizontal " id="add-update-from" method="post" enctype="multipart/form-data">

                        <div class="form-group col-md-12">
                            <label class="col-sm-3 control-label text-muted">文件类型<span class="text-red">*</span></label>
                            <div class="col-sm-9">
                                <select name="fileType" style="width: 100%">
                                    <option value='0'>培训开始前</option>
                                    <option value='1'>培训中</option>
                                    <option value='2'>培训结束</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group col-md-12">
                            <label class="col-sm-3 control-label text-muted">文件<span class="text-red">*</span></label>
                            <div class="col-md-9">
                                <input type="file" class="file" name="files" multiple id="files">
                            </div>
                        </div>

                    </form>
                </div>
            </div>
        </div>

        <div class="box-footer">
            <span class="pull-right">
                <button data-iziModal-close class="btn btn-default" style="margin-right: 5px">取消</button>
                <button id="saveEmployee" type="button" class="btn btn-info">保存</button>
            </span>
        </div>
    </div>


    <script src="<%=basePath%>/plugins/jQuery/jquery-2.2.3.min.js"></script>
    <script src="<%=basePath%>/bootstrap/js/bootstrap.min.js"></script>
    <script src="<%=basePath%>/plugins/slimScroll/jquery.slimscroll.min.js"></script>
    <script src="<%=basePath%>/plugins/fastclick/fastclick.js"></script>
    <script src="<%=basePath%>/dist/js/app.min.js"></script>
    <script src="<%=basePath%>/dist/js/demo.js"></script>
    <script src="<%=basePath%>/bootstrapvalidator/js/bootstrapValidator.min.js"></script>
    <script src="<%=basePath%>/toastr/toastr.js"></script>
    <script src="<%=basePath%>/pagination/js/jquery.pagination.min.js"></script>
    <script src="<%=basePath%>/js/overallSituation.js"></script>
    <script src="<%=basePath%>/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script src="<%=basePath%>/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <script src="<%=basePath%>/plugins/select2/select2.min.js"></script>
    <script src="<%=basePath%>/plugins/select2/i18n/zh-CN.js"></script>
    <script src="<%=basePath%>/plugins/iCheck/icheck.min.js"></script>
    <script src="<%=basePath%>/plugins/iziModal/js/iziModal.min.js"></script>
    <script src="<%=basePath%>/plugins/flavr/flavr.min.js"></script>
    <script src="<%=basePath%>/fileupload/fileinput.min.js"></script>
    <script src="<%=basePath%>/fileupload/zh.js" type="text/javascript"></script>
    <script src="<%=basePath%>/plugins/bootstrap-treeview/js/bootstrap-treeview.js"></script>
    <script src="<%=basePath%>/js/map.js"></script>
    <script src="<%=basePath%>/js/train/train-page.js"></script>
    </body>
</html>
